<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户列表</title>
    
	<link rel="stylesheet" type="text/css" href="css/commonStyle.css">

	<script type="text/javascript" >
	function viewData(id, name) {

		var api = frameElement.api, W = api.opener;

		W.setCustomerValue(id ,name);

		api.close();
	}
	</script>
  </head>
  
  <body>
    <table class="fullTableStyle">
    	<thead>
    		<tr>
    			<td>编号</td>
    			<td>客户名</td>
    			<td>操作</td>
    		</tr>
    	</thead>
    	<tbody>
    	<s:iterator value="infoes" var="info">
    		<tr>
    			<td><s:property value="#info.id" /></td>
    			<td><s:property value="#info.name" /></td>
    			<td><button onclick="viewData(<s:property value='#info.id' />, '<s:property value='#info.name' />')" >选择</button></td>
    		</tr>
    	</s:iterator>
    	</tbody>
    	<tfoot>
    		<tr>
    			<td colspan="3">
    				<ul>
	    				<li><a href="CustomerInfo_load.action?pageNumber=${ page.pageCount }" >尾页</a></li>
	    				<s:if test="page.hasNext">
	    					<li><a href="CustomerInfo_load.action?pageNumber=${ page.pageNumber + 1 }" >下一页</a></li>
	    				</s:if>
	    				<s:if test="page.hasPre">
	    					<li><a href="CustomerInfo_load.action?pageNumber=${ page.pageNumber - 1 }" >上一页</a></li>
	    				</s:if>
	    				<li><a href="CustomerInfo_load.action?pageNumber=1" >首页</a></li>
	    				<li class="tfootContStyle"><span>共&nbsp;<s:property value="page.pageCount" />&nbsp;页,第&nbsp;<s:property value="page.pageNumber" />&nbsp;页</span></li>
    				</ul>
    			</td>
    		</tr>
    	</tfoot>
    </table>
  </body>
</html>
